<script>
  // Makes figure images focusable for zooming
  let figureImages = document.querySelectorAll ("figure img");
  figureImages.forEach (function (figureImage) {
    figureImage.setAttribute ("tabindex", -1);
    document.addEventListener ('mousedown', event => {
      if (document.activeElement === figureImage) {
        // Prevent it from triggering on focusIn
        setTimeout (function () {
          document.activeElement.blur ();
        }, 100);
      }
    });
  });
</script>

